local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system(
        { "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git",
            "--branch=stable", -- latest stable release
            lazypath })
end
vim.opt.rtp:prepend(lazypath)

local plugins = {
    'nvim-treesitter/nvim-treesitter',
    'onsails/lspkind.nvim',
    'ray-x/lsp_signature.nvim',
    'ray-x/navigator.lua',
    'jubnzv/virtual-types.nvim',
    "williamboman/mason.nvim",
    "williamboman/mason-lspconfig.nvim",
    "neovim/nvim-lspconfig",
    'ms-jpq/coq_nvim',
    'APZelos/blamer.nvim',
    'lewis6991/gitsigns.nvim',
    'tpope/vim-fugitive',
    'editorconfig/editorconfig-vim',
    'junegunn/goyo.vim',
    'karb94/neoscroll.nvim',
    {
        "kylechui/nvim-surround",
        version = "*",
        event = "VeryLazy",
        config = function()
            require("nvim-surround").setup({})
        end
    },
    {
        "ellisonleao/glow.nvim",
        config = true,
        cmd = "Glow"
    },
    'nvim-tree/nvim-tree.lua',
    'nvim-tree/nvim-web-devicons',
    {
        'nvim-telescope/telescope.nvim',
        tag = '0.1.2',
        dependencies = { 'nvim-lua/plenary.nvim' }
    },
    { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
    {
        "nvim-telescope/telescope-frecency.nvim",
        dependencies = { "kkharji/sqlite.lua" },
    },
    {
        "catppuccin/nvim",
        name = "catppuccin",
        priority = 1000
    },
    {
        "f-person/auto-dark-mode.nvim",
        config = {
            update_interval = 1000,
            set_dark_mode = function()
                vim.api.nvim_set_option("background", "dark")
                vim.cmd("colorscheme catppuccin-frappe")
            end,
            set_light_mode = function()
                vim.api.nvim_set_option("background", "light")
                vim.cmd("colorscheme catppuccin-latte")
            end
        }
    },
    {
        'akinsho/bufferline.nvim',
        version = "*",
        dependencies =
        'nvim-tree/nvim-web-devicons'
    },
    {
        'nvim-lualine/lualine.nvim',
        dependencies = 'nvim-tree/nvim-web-devicons'
    },
    'terryma/vim-multiple-cursors',
    'junegunn/vim-easy-align',
    'easymotion/vim-easymotion',
    'jiangmiao/auto-pairs',
    {
        "folke/todo-comments.nvim",
        requires = "nvim-lua/plenary.nvim",
    },
    { 'numToStr/Comment.nvim' },
    { "lukas-reineke/indent-blankline.nvim" },
    'simrat39/symbols-outline.nvim',
    {
        "folke/noice.nvim",
        event = "VeryLazy",
        opts = {
            -- add any options here
        },
        dependencies = {
            -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
            "MunifTanjim/nui.nvim",
            -- OPTIONAL:
            --   `nvim-notify` is only needed, if you want to use the notification view.
            --   If not available, we use `mini` as the fallback
            "rcarriga/nvim-notify",
        }
    },
    { 'L3MON4D3/LuaSnip', dependencies = { "rafamadriz/friendly-snippets" } },
    {
        "hrsh7th/nvim-cmp",
        version = false, -- last release is way too old
        event = "InsertEnter",
        dependencies = {
            "hrsh7th/cmp-nvim-lsp",
            "hrsh7th/cmp-buffer",
            "hrsh7th/cmp-path",
            "saadparwaiz1/cmp_luasnip",
        },
    }

}

local opts = {}
require("lazy").setup(plugins, opts)
